<template>
  <layout :config="navConfig">
    <template #default>
      <div class="login-logo">
        <img src="../assets/img/SD-01.png" style="width: 100px;height: 100px">
      </div>
      <div class="m-task-info-box">
        <div class="task-item_info" v-for="$item in taskData" :key="$item.id">
          <p>
            <span>交易金额</span>
            <span v-if="$item.is_pid==1">{{100 *0.5*Math.pow(2,$item.type)}}$</span>
            <span v-if="$item.is_pid==0">{{100 *0.2*Math.pow(2,$item.type)}}$</span>
          </p>
          <p>
          <span>打款人</span>
          <span>{{$item.payeruser}}</span>
          </p>
          <p>
            <span>打款人微信</span>
            <span>{{$item.cwechatqrcode}}</span>
          </p>
          <p>
            <span>打款人支付宝账户</span>
            <span>{{$item.calypayqrcode}}</span>
          </p>
          <p>
            <span>打款人手机号</span>
            <span>{{$item.username}}</span>
          </p>
          <p>
            <span>交易时间</span>
            <span>{{$item.paytime}}</span>
          </p>

          <div class="m-task-status">
            <span class="success" v-if="$item.is_pay==1">
              <i class="iconfont icon-checkbox-circle-line"></i>
              <span>交易成功</span>
            </span>
            <span class="failed"  v-if="$item.is_pay==2">
              <i class="iconfont icon-close-circle-fill"></i>
              <span>交易失败</span>
            </span>
          </div>
        </div>
      </div>
    </template>
  </layout>
</template>

<script lang="ts">
    import { Component, Vue } from "vue-property-decorator";
    import { INavigation } from "@/types";
    import {Toast} from 'mand-mobile'
    @Component({
        name: "MatchHistory",
        created: function () {
            this.type = this.$route.query.key;
            this.paymoney = this.$route.query.money / 100 * 10;
            Toast.loading("请求中...");
            let usera = JSON.parse(localStorage.getItem('users1'));

            this.$api.paylist({"search_EQ_a.username": usera.username}).then(res => {
                Toast.hide();
                if (res.success == 200) {
                    this.taskData = res.data;
                    // this.formData_1.commit=usera.username;
                    console.log(res.data);
                }
            }).catch(res => {
                Toast.hide();
            })


        }
    })
    export default class extends Vue {
        navConfig: INavigation = {
            text: "已匹配"
        };

        taskData = [

        ];
    }
</script>

<style lang="scss">
  @import "../assets/styles/match_history.scss";
</style>
